1. Field of the Invention
This invention relates generally to inter-process communication computer systems, and more particularly to a system and method for using door translation to perform inter-process communication.
2. Description of the Background Art
In some operating systems, a computer process, i.e., an instance of a computer program currently executing, can create additional execution entities, referred to as xe2x80x9cthreads,xe2x80x9d which become part of the computer process and which execute xe2x80x9cconcurrentlyxe2x80x9d with one another. Each thread is scheduled independently for execution by the kernel. A computer process capable of having multiple threads is generally called xe2x80x9cmultithreaded.xe2x80x9d Each thread shares the address space and resources allocated to the computer process. Therefore, the memory space generally is allocated to all threads of the computer process, rather than to individual threads.
It is sometimes desirable to allow a first computer process to perform an operation without granting the authority to perform similar, but different, operations to a related second computer process. For example, it may be desirable to permit a first computer process to monitor the status of a second computer process without granting other access rights. Similarly, only a first computer process referred to as the xe2x80x9cserver processxe2x80x9d may be permitted to perform a particular task called the xe2x80x9csubject operationxe2x80x9d. Accordingly, the first computer process allows other computer processes referred to as xe2x80x9cclient processesxe2x80x9d and which do not have such authority to perform the operation only within the address space of and under the authority of the server process. For example, a server process can monitor the status of various computer processes at the request of a client process, which may have no direct access to the other computer processes.
System designers at Sun Microsystems, Inc. have developed door technology to provide a relatively efficient mechanism for performing Inter-Process Communication (IPC), or more particularly for performing Remote Procedure Calling (RPC), in which a first computer process, i.e., a client process, invokes a door call which initiates the performance of a procedure defined and executed by a second computer process, i.e., the server process. The server process performs the requested operation and returns a result to the client process. Door mechanisms are described, for example, in Graham Hamilton and Panos Kougiouris, xe2x80x9cThe Spring Nucleus: A Microkernel for Objects,xe2x80x9d Usenix Conference 1993, at 147-160 (June 1995), which is incorporated herein by reference. Doors are further described in U.S. application Ser. No. 08/563,155, now U.S. Pat. No. 6,170,018, entitled xe2x80x9cRemote Procedure Calling Using an Existing Descriptor Mechanism,xe2x80x9d filed on Nov. 27, 1995, by inventors James J. Voll, Graham Hamilton, Panagiotis Kougiouris and Steven R. Kleiman, which is also incorporated herein by reference.
Operating systems which implement door technology have processes dedicated for performing different tasks including data access operations such as READ and WRITE. Accordingly, computer programmers author application programs that apply the latest door technology to implement these data access operations. Legacy application programs which request READ or WRITE operations will fail in a doors environment. To render these legacy application programs operative, either the legacy application program must be modified to apply door calls instead of these data access operations, which is a cumbersome and time-consuming process, or a legacy operating system (i.e., one without door technology) must be used. Therefore, a system and method are needed to enable legacy application programs to operate in a doors environment.
A preferred embodiment of the present invention provides a system and method for translating simple data access operations into implicit inter-process communications between server and client processes. The system and method enable a legacy computer program to invoke traditional operations such as READ and WRITE, which would otherwise be unavailable in a doors environment. Transparent to the calling program, the described embodiment of the present invention translates the otherwise unavailable operation into a door call. Thus, the system and method may support legacy application programs and may provide programmers with a simpler programming mechanism than those required by a current door system.
A system in accordance with the present invention comprises a door file system having a translator for invoking a door call in response to an operation request received, and a server process communicating with the translator for performing a service in response to the door call. Accordingly, two new door call operations referred to as KERN_READ and KERN_WRITE have been created. Similarly, the method in accordance with the present invention translates simple data access operations into implicit inter-process communications between server and client processes. The method comprises the steps of receiving a data access operation request, and invoking a door call in response to the received operation request. It will be appreciated that the system and method advantageously enable legacy application programs to access files in a doors environment. The system and method provide programmers with a simple programming mechanism for accessing doors indirectly.
Still other embodiments of the present invention will become readily apparent to those skilled in the art from the following detailed description, wherein is shown and described only the embodiments of the invention by way of illustration of the best modes contemplated for carrying out the invention. As will be realized, the invention is capable of other and different embodiments and several of its details are capable of modification in various obvious respects, all without departing from the spirit and scope of the present invention. Accordingly, the drawings and detailed description are to be regarded as illustrative in nature and not as restrictive